import javax.microedition.lcdui.*;

public class SlashScreen extends Canvas implements Runnable {
	
	private static final int sleeptime = 1000;
	
	private int width, height;
	private Image Ngoan;
	private Display display;
	private GameMIDlet MIDlet;
	
	public SlashScreen(GameMIDlet MIDlet, Display display){
		this.display = display;
		this.MIDlet = MIDlet;
		setFullScreenMode(true);
		width = getWidth();
		height = getHeight();
		
		try {
			Ngoan = Image.createImage("/Ngoan.png");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	protected void paint(Graphics g) {
		g.setColor(0x000000);
		g.fillRect(0, 0, width, height);
		g.drawImage(Ngoan, 0, 0, 0);
	}
	
	public void run() {
		try {
			Thread.sleep(sleeptime);			
		} catch (InterruptedException e) {
			e.printStackTrace();
		}		
	}

}
